﻿using System;
using GDIT.BLL;
using GDIT.Base.PageBaseHelper;
using GDIT.Model;

namespace GDIT.page.manage.notice
{
    public partial class video : System.Web.UI.Page
    {

        private BVideoInformationArticle videoArticle = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(Session["UserName"].ToString()))
                {
                    PageBase.MessageBoxShowAndGo("检查到你还没有登录，请先登录，谢谢！", "~/page/manage/login.aspx", Page);
                    return;
                }
                if (!IsPostBack)
                {
                    BindData();
                }
            }
            catch (Exception ex)
            {
                PageBase.MessageBoxShow("操作失败，原因：" + ex.Message.ToString(), Page);
            }
        }

        //绑定数据
        private void BindData()
        {
            videoArticle = new BVideoInformationArticle();
            this.VideoRepeater.DataSource = videoArticle.SelectAllVideoyAdmin();
            this.VideoRepeater.DataBind();
        }

        /// <summary>
        /// 修改视频公告
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        { 
            //......
            //刷新本页面
            videoArticle = new BVideoInformationArticle();

        }
    }
}